<?php

namespace adibilis\adminBundle\Form;

use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;

class PageType extends AbstractType
{
    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder
            ->add('title',   'text', array('label' => "Titre de la page"))
            ->add('titleen',   'text', array('label' => "Titre de la page (Anglais)"))
            ->add('titlede',   'text', array('label' => "Titre de la page (Allemand)"))
            ->add('slug',   'text', array('label' => "Slug de la page"))
            ->add('content',      'textarea' , array( 'attr' => array('class' => 'ckeditor'), 'label' => "Contenu de l'article", 'required' => false))
            ->add('contenten',      'textarea' , array( 'attr' => array('class' => 'ckeditor'), 'label' => "Contenu de l'article (Anglais)", 'required' => false))
            ->add('contentde',      'textarea' , array( 'attr' => array('class' => 'ckeditor'), 'label' => "Contenu de l'article (Allemand)", 'required' => false))
        ;
    }

    public function setDefaultOptions(OptionsResolverInterface $resolver)
    {
        $resolver->setDefaults(array(
            'data_class' => 'adibilis\adminBundle\Entity\Page'
        ));
    }

    public function getName()
    {
        return 'adibilis_adminbundle_pagetype';
    }
}
